import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: "/",
    redirect: "/home"
}, {
    path: '/home',
    name: 'Home',
    component: () =>
        import ('../views/Home/Home.vue'),
    children: [{
        path: "/home",
        redirect: "/home/index"
    }, {
        path: '/home/index',
        name: 'Index',
        component: () =>
            import ('../views/Index/Index.vue')
    }, {
        path: '/home/question',
        name: 'Question',
        component: () =>
            import ('../views/Question/Question.vue')
    }, {
        path: '/home/Interrogation',
        name: 'Interrogation',
        component: () =>
            import ('../views/Interrogation/Interrogation.vue')
    }, {
        path: '/home/record',
        name: 'Record',
        component: () =>
            import ('../views/Record/Record.vue')
    }, {
        path: '/home/my',
        name: 'My',
        component: () =>
            import ('../views/My/My.vue')
    }]
}, ]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router